projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d7f6477
)
Test module: add necessary version checks
author
Philipp Stephani
<phst@google.com>
Mon, 12 Jun 2017 14:28:16 +0000
(16:28 +0200)
committer
Philipp Stephani
<phst@google.com>
Mon, 12 Jun 2017 14:28:16 +0000
(16:28 +0200)
* test/data/emacs-module/mod-test.c (emacs_module_init): Add necessary
version checks.
test/data/emacs-module/mod-test.c
patch
|
blob
|
history
diff --git
a/test/data/emacs-module/mod-test.c
b/test/data/emacs-module/mod-test.c
index fc29a0d6b9a917ac1f82fa2a86ff43a34221ff17..f378db00cd472a294a50559949c28928bb49406f 100644
(file)
--- a/
test/data/emacs-module/mod-test.c
+++ b/
test/data/emacs-module/mod-test.c
@@
-264,8
+264,14
@@
bind_function (emacs_env *env, const char *name, emacs_value Sfun)
int
emacs_module_init (struct emacs_runtime *ert)
{
+ if (ert->size < sizeof *ert)
+ return 1;
+
emacs_env *env = ert->get_environment (ert);
+ if (env->size <= sizeof *env)
+ return 2;
+
#define DEFUN(lsym, csym, amin, amax, doc, data) \
bind_function (env, lsym, \
env->make_function (env, amin, amax, csym, doc, data))